Google
 

Trailing-Edge - PDP-10 Archives - 6.1_emacs_manuals_1er - emacs/interlisp-mode.:ej
There are no other files named interlisp-mode.:ej in the archive.
 W[0 +8+fq(+4)[1
0fo10f"g+q1'
+fq()+4u1
fq1"l 0'
,q1:m(q1+4(]1]0))Y.aq&4# ,#4#L q!"""-"Xa		g	z
*
3O]luP`4Aq
!0Q	0ez!+mv.@gyCBCJ:i:{<<'<==d=y>z?	AB@oAAA#+++N+Z(w)+w,
44`4p5/5:6\6m6{7
8"9
99W9c:!:7:E:Z$'$1$$GG!InterLisp ModeJM(M.M& Init Buffer Locals)
M.M^R Indent for LispM.QI
 Q(Q.M.Q)M.Q.
 0fo..qInterLisp ..Df"n m.q..D'
"#w :i..D..D
1m(m.m& Alter ..D)<([(])>)%/"|/A|A;A !'!
q..Dm.vInterLisp ..Dw
q..DM.Q..D'
M.M^R InterLisp ]m.Q]
m.m^R Indent for InterLispm.Q	
m.m^R Indent for (* Commentm.Q..;
m.m^R Insert InterLisp Parameter Nameu..{
 m.m^R Insert InterLisp PROG Variable Nameu..}
 m.m^R InterLisp ?=u...?
1,1M.LSpace Indent Flag
1,36M.LComment Column
 1,0M.LComment Start

1,(:i*)M.LComment End

Q.0,1M(M.M& Set Mode Line)InterLisp
Find InterLisp Source File@[1[2[3
 5,fFind InterLisp Source Fileu1
q1"e 1'
fq1"e
5,m(m.m& Read Filename)Find InterLisp Source Fileu1'
q1"e 1'
m(m.mFind File)1
 m(m.mReset To InterLisp Temporary)
 (Collect Function To Zap To InterLisp[1[2
 @m(m.m^R Mark Defun)w
:,.fx*u1
m(m.m& Find Collected SExp Buffer)u2w
q2[..o
0fsVZw
zj i

(DEFINEQ
1)

$Zap Collected SExps To InterLispI[1[2[3
 m(m.m& Find Collected SExp Buffer)u1u2

q1[..o
fsModified"n
0fo..qSave CollectedSExps File"n
q.F[..F

-1,m(m.mWrite File)2''
0fsVBw 0fsVZw
zj -:s
(* * * Zapped to InterLisp * * *)
"l fkc'"# bj'
.fsVBw
h m(m.m& Zap To InterLisp)
zj f[Modified

i
(* * * Zapped to InterLisp * * *)


 Add Sexp To PROG Listk.[0 fnq0j
-:@fll
-@flx*[1
-s(PROG[PROG
2fdl ful r
@m(m.m^R Indent New Line)f
.,(g1).f
1Analyze For ?=
.[1 fn q1j
0f[vb 0f[vz bj
[1[2[3[4
 1m.vLAMBDA LAMBDA Flagw
1m.vNLAMBDA LAMBDA Flagw
1m.vDLAMBDA LAMBDA Flagw
:< :s
(
[;  @fwx2
.u1
@ft.
2:@fwl
@fwx3
0fo..q3 LAMBDA Flag"n
2:@fll 	@flx4
:i*(2 [3 4]) m.v?= 2 ?=w
'
     "# q1j' >
&Collect Region To Zap To InterLispa[1[2[3
 :,.fx1
m(m.m& Find Collected SExp Buffer)u2w
q2[..o
0fsVZw
zj i

1

Function Occur8:i*[0[1[2[3
.u1
:i2
m.m^R Beginning of DEFUN
bj
< :s0;
@mBw c
@flx3
f=3DEFINEQ"n

0fo..qAtom 3 Not Function"e
:i223

ff&2"e @flt ft
		  ''
r @fll'
:s

( ;
>
q2m.vLast InterLisp Function Listw
ff&2"e :fi-?"e 0u..h fiw m(m.m Goto InterLisp Function)?''

q1j Goto InterLisp Functionf:i*[.0
.[.1
0[.2[.3[..J
 0,fsZ fsBoundariesw
f=.0?"e
0fo..qLast InterLisp Function Listu.3
q.3"e 1,m(m.m Function Occur)
qLast InterLisp Function Listu.3'
f[BBind
g.3 bj
:i..jSelect InterLisp function to find  
0l :@fll @flx.0
f]BBind'
bj

m(m.m& Prefix Goto InterLisp Function).0u.2
q.2"e
ff"e bj'
"# q.1j'
m(m.m& Prefix Goto InterLisp Function).0u.2'

q.2"e q.1j
:i*InterLisp function .0 not found fsErr'
0 @m(m.m^R New Window) Edit Interlisp Functione:i*[.1
fq.1"g m(m.m Goto InterLisp Function).1'

@m(m.m^R Mark Defun)w
@m(m.m^R Set Bounds Region)w
bj @f	 
r .fsVBw
.fsWindoww
@fwl

1fo..qMark Edited Interlisp Functions"n
@m(m.m^R Edited-By)f'
1 Reset To InterLisp Temporary(f[Modified
f[DFile fsHSNamefsDSNamew
 fsDSName:f6[H
m(m.m Set Visited Filename)H; TEMP

m(m.m InterLisp Mode)
 m(m.m & From Interlisp Brackets)
 Zap Buffer To InterLisp{[1[2[3  q..o[0
m(m.m& Find Collected SExp Buffer)u1w
q1[..o 0fsVZw
zj g0
:m(m.mZap Collected SExps To InterLisp)Zap Function To InterLispZm(m.mCollect Function To Zap To InterLisp)
 :m(m.mZap Collected SExps To InterLisp)Zap Region To InterLispXm(m.mCollect Region To Zap To InterLisp)
 :m(m.mZap Collected SExps To InterLisp)Zap String To InterLisp:i*[0[1
m(m.m& Find Collected SExp Buffer)u1w
q1[..o 0fsVZw
zj i

0


:m(m.mZap Collected SExps To InterLisp)^R Edited-Byc[.0 z-.:\u.0 fn1:<(z-.0)j>w
[.1[.2 f[VB f[VZ
@m(m.m^R Beginning of DEFUN)w
2fdl 2@fll

< @f 	
  r
1a-(@:;
c @fwf=DECLARE"e
r @fll'
"# @fwf=CLISP:"e
r @fll'
"# r 1;'' >
.u.0
13f~(* Edited by "e
flk @f 	k'
1a-15."n fsHPos'"# 0'u.1
q.1"g i
 2r'
 @m(m.m^R Indent for (* Comment)f
 iEdited by 
 0fo..qInterlisp Edited-By Nameu.2
q.2"e g(fsXUName:f6)'
"# g.2'
i on 

 .fsVBw fsZ-.fsVZw
eg j 5k 2:fwk
fwfx.2
d fwl 3d i-.2-
2c .,zk
i)
0fsVBw 0fsVZw
m.m^R Indent For Lisp[I
0@m w
1a-15."n i
'
@f
l
q.1"n q.1m(m.m& Indent)w'
l q.0,. ^R End InterLisp Comment..,(i *)).f
.-z"e .,(i
).f'"# l'
1 ^R Goto InterLisp FunctionC[1[2
 -@f
 	l
-@fwx1
m(m.mGoto InterLisp Function)1^R Indent for (* CommentS:i*(*[Comment Start
:i*(* [Comment Begin
@:m(m.m^R Indent for Comment)^R Indent for InterLisp.[.0[.1 0[.2

<
1,m(m.m^R Indent For LISP)u.1

q..2"l 1;'
q..2-."g 1;'
q..2,q..2+2f=(*"n 1;'
q.2"n q.2j 2d'
0u.2
q..2j

0:fb)"l q..2j -fll
.u.2 i
	     '
"# 0l'
>
q.2"n q.2j 2d'
q.0j
z-.u.0
0l
1:<q.1 m(m.m& Indent)f>
z-.-q.0"g z-q.0j'
1&^R Insert InterLisp Parameter Namei[1
 .( -s(LAMBDA[LAMBDA(NLAMBDA[NLAMBDA(DLAMBDA[DLAMBDA

+1:@fwl
@fwx1
)j
.,(g1).*^R Insert InterLisp PROG Variable NameO.[0[1[2[3[4[5
-s(PROG[PROG
2fdl
.u2
-1@fll

:fwl @fwx1
q0j
g1
q0,.@v
:fiu3
q3-+"n q3--"n 1''

fiw
q0,.k

ff&2"e
q2j -ful
flu4w
0u1
:i*C fs echo displayw
:< q2j
%1:@fll :@fwl .-q4;
@fw@t @ft  >
0fs echo activew
q0j'
1,(q3-+"e +1'"# -1')(
) @m(m.m^R Insert InterLisp PROG Variable Name)^R InterLisp ?=.[1 fn q1j
[1[2[3
 -:ful :@fwl @fwx1
0fo..q?= 1 ?=u2
q2"e FG 1'
:i*C fs echo displayw
@ft2
0fs echo activew
1^R InterLisp ]p.[.1[.2[.3
i]
z-.u.2
<

-fll
1a-["E 1;'
z-q.2-1j i)
c>
z-q.2j
-d
q.1,.f
f@:m(]fs^RInit)
%^R List InterLisp Parameter NamesN[1
 .( -s(LAMBDA[LAMBDA
c :fll flx1
)j
@ft1 0fsechoactivew
1$^R List InterLisp PROG VariablesJ[1
 .( -s(PROG[PROG
c :fll flx1
)j
@ft1 0fsechoactivew
1& Act Upon InterLisp Returng0[1[2[3
:i*..D[..D
[*5+1:f..D(
]*5+1:f..D)
fs qp ptr[.0
f[bbind f[dfilew
 1:< erLISP-TO-EMACS.XFER.1 @y >"e
m(m.m& From Interlisp Brackets)
fdl
@fwx1
2:@flr
@flx2
edLISP-TO-EMACS.XFER.1
'
q.0fs qp unwindw
q1"n
1,0m.m& Process InterLisp 1 Requestu3
q3"n q2m3 '
:i*REQ	Unknown InterLisp request type 1 fs err'
  & Find Collected SExp Bufferi[1[2[3 :i2CollectedSExps
1,q2 m(m.m& Find Buffer)u1
q1+1"e
[Previous Buffer
f[DFile
qBuffer Nameu3
@ft
(Creating 2 buffer...
q2 m(m.mSelect Buffer)
etDSK: fsHSNamefsDSNamew
etCollectedSExps TEMP
fsDFile uBuffer Filenames
q..ou1
q3 m(m.mSelect Buffer)
@ftdone) 0fsEchoActivew
(fsDFile),q1 '
(q:.b(q1+2)),(q:.b(q1+4)) & From Interlisp Brackets:.[.1[.2[.3[..j bj
< !ITER!
:s]; z-.u.2
-1a-%"e oITER'
:<

-fll
1a-["E 1;'
z-q.2-1j i)
c
>"n

z-q.2j
:i..jPlease fix this bracket  '
"#      z-q.2j'
>
q.1j 0l $& Prefix Goto InterLisp Functiony:i*[.0
.[.1
< :s
(.0;
@:f 	
  r

@f 	
  r
7f=(LAMBDA"e -l fwl 1'
7f=[LAMBDA"e -l fwl 1'
8f=(NLAMBDA"e -1 fwl 1'
8f=[NLAMBDA"e -1 fwl 1'
8f=(DLAMBDA"e -1 fwl 1'
8f=[DLAMBDA"e -1 fwl 1'
>
q.1j
0& Return To InterLisp
[1
 0fo..qDont Return To InterLisp"n
    :i*Cant return now, not at top level fsErr'
 1m.vDont Return To InterLispw
f[DFilew fsHSNamefsDSNamew
fsDSName:f6u1
1:<erEMACS-LISP-COROUTINE.CMDec>"n
f[BBindw iPOP
CONTINUE

    ew pwefEMACS-LISP-COROUTINE.CMD'
f+
TAKE <1>EMACS-LISP-COROUTINE.CMD

m(m.m& Act Upon InterLisp Return)
 0m.vDont Return To InterLispw
"& SetUp InterLisp-Mode Library?1m.cSave CollectedSExps File* Non-0 enables auto-saving of collected SExps.w
 1m.vAtom RPAQ Not Functionw
1m.vAtom RPAQQ Not Functionw
1m.vAtom PRETTYCOMPRINT Not Functionw
1m.vAtom ADDTOVAR Not Functionw
1m.vAtom * Not Functionw
1m.vAtom FILECREATED Not Functionw
1m.vAtom DECLARE: Not Functionw
& Zap To InterLispfsQPPtr[0
[1[2 .:\u1 fn1j
ffu2u1
q1j
@f 	
l
.-q2"l
f[DFilew fsHSNamefsDSNamew
etEMACS-TO-LISP.XFER.1
ew
q1,q2 p
q2j -@:fll
-@fwf=STOP"n
f[Modifiedw
.,(i
STOP
	       ).f(p)k'

ef'
q0fsQPUnwindw
:m(m.m & Return To InterLisp)
/& SetUp Compressed INTERLISP-MODE Libraries1,m.m& Compressed TMACS Library:"e
1,m(m.m& Get Library Pointer)TMACS"e
f[:EJPage
:ejemacs;TMACS :ej''
m.m& Default Variable



~FILENAME~INTERLISP-MODE~DOC~ ~FILENAME~1EMACS functions for editing InterLisp code.
~DOC~ InterLisp Mode[C Set things up for editing InterLisp code.
The following keys are set:
    ) > and ] all show the ( < or [ they match.
    ] inserts enough )s to balance the previous [.
    Tab indents to a "prettyprint" place.
    Meta-; indents and starts a (* comment.
    Meta-{ inserts the argth parameter of the current function being edited.
    Meta-} inserts the argth PROG variable.  (Describe it via Meta-? -- it
					      is a bit hairier/more-useful.)
    Control-Meta-? runs ^R InterLisp ?=, which is similar to InterLisp's ?=.
	You can describe it (and Analyze For ?=) for more details.
$~DOC~ Find InterLisp Source FileDC String argument is filename.
It asks for a filename if a null string argument is given.
    If you answer with a null name again, it uses the default filename.
File is put into its own buffer with name being the file's 1st name.
Then the filename is reset to be a .TEMP file in the home directory.
Finally the file is prepared for editing by going into InterLisp mode and
    ensuring that there are enough )s before ]s to balance things.
.~DOC~ Collect Function To Zap To InterLispC Add to CollectedSExps buffer.
Doing MM Zap Collected SExps To InterLisp will send it and other
    collected sexps back to InterLisp.
*~DOC~ Zap Collected SExps To InterLisp/C Send stuff in CollectedSExps buffer.
Sends all sexps in CollectedSExps buffer that haven't been zapped yet:
    Everything after the last "(* * * Zapped to InterLisp * * *)" line.
Unless the option Save CollectedSExps File is 0, we write out the
    CollectedSExps buffer if it needs saving.
~DOC~ Add Sexp To PROG ListxC Previous sexp is added to previous PROG list.
Sexp may be either just the variable name, or a pair defining it.
~DOC~ Analyze For ?=:C Find all functions in buffer, for ^R InterLisp ?=.
,~DOC~ Collect Region To Zap To InterLispFC Zap it later.
Appends region to end of CollectedSExps buffer.
~DOC~ Function Occur+C List functions with STRARG occuring in them.
List is also saved in $Last InterLisp Function List$,
    which Goto InterLisp Function can also access.
If the character immediately following Function Occur is "?",
    control is transferred to Goto InterLisp Function allowing
    the user to use a recursive ^R on the list to jump to the function.
1, means just make variable, dont print the list or check for "?".
!~DOC~ Goto InterLisp FunctionC Put point at start of function STRARG.
Searches over whole buffer, setting wide bounds first.
Leaves point after the function name.
NUMARG means start from point and find next match.

If STRARG is "?", a recursive ^R is called on $Last InterLisp Function List$
    which is set by other functions, e.g. Function Occur (TEST).
    If the variable does not exist, it defaults to a list of all functions
    in the buffer.

This may want to turn into a TAGS thing some day.  At least may want to
hack multiple buffers/files.
!~DOC~ Edit Interlisp Function%C Prepare for editing function STRARG.
STRARG may be a prefix of the function name -- first found.
Null string arg means the function containing point.
Bounds are set around this function, and it is marked with an edited-by
    comment, unless $Mark Edited Interlisp Functions$ is 0.
&~DOC~ Reset To InterLisp TemporaryEC Resets filename, InterLisp Mode, brackets.
Filename of visited file to home directory and extension of TEMP.
Go into InterLisp mode and add enough parentheses before ]s to balance things.
!~DOC~ Zap Buffer To InterLispC Send contents of buffer to InterLisp.
Appends this buffer to end of CollectedSExps buffer,
then does a Zap Collected SExps To InterLisp.
#~DOC~ Zap Function To InterLisp1C Send function defined around point.
Does a Collect Function To Zap To InterLisp, followed by
    Zap Collected SExps To InterLisp.
Region is left around the function.
!~DOC~ Zap Region To InterLispC Send point to MARK to InterLisp.
Does a Collect Region To Zap To InterLisp, followed by
    Zap Collected SExps To InterLisp.
!~DOC~ Zap String To InterLisp~C Send STRARG to InterLisp.
Appends STRARG to CollectedSExps buffer, then does a
    Zap Collected SExps To InterLisp.
~DOC~ ^R Edited-ByD^R Marked as edited with $Interlisp Edited-By Name$.
Puts an Interlisp edited-by comment on function containing point.
The edited-by name is taken from $Interlisp Edited-By Name$, which
    defaults to the username.
This function knows about putting the comment after DECLARE and CLISP:
    compiler declarations.
"~DOC~ ^R End InterLisp Comment^R Insert *) and CRLF.
$~DOC~ ^R Goto InterLisp Function-^R Find function whose name is to left.
"~DOC~ ^R Indent for (* Comment$^R Start an InterLisp comment.
!~DOC~ ^R Indent for InterLisp%^R Like LISP but ignore (*...).
,~DOC~ ^R Insert InterLisp Parameter Name^R Argth param.
0~DOC~ ^R Insert InterLisp PROG Variable NameP^R Argth progvar.
If next character typed is + or -, list of PORG variables is shown in echo
    area and then we recurse with NUMARG+1 or NUMARG-1 after deleting the
    variable name just inserted.
~DOC~ ^R InterLisp ?=^R Show function kind and parameters in echo area.
The command Analyze For ?= will store the info needed by this command.
~DOC~ ^R InterLisp ]}C Add enough parens so inserted ] balances [.
Will assume there is always matching [...], i.e. not handle top-level-].
+~DOC~ ^R List InterLisp Parameter Names^R Of enclosing lambda.
*~DOC~ ^R List InterLisp PROG Variables^R Of enclosing lambda.
%~DOC~ & Act Upon InterLisp Return2S Process LISP-TO-EMACS.XFER.1 file.

*** For the moment this isnt used and maybe should be scrapped as slow and
awkward?

File is one list:  CAR is RequestType, CADR is 1 sexp, the argument.
Calls & Process InterLisp <requesttype> Request, which should take one
    NUMARG, the sexp argument.
&~DOC~ & Find Collected SExp Buffer0S Returning buffer filenames, pointer.
Finds/creates EMACS buffer of name CollectedSExps,
and gives it filename.
Returns Val1,Val2:  Val1 is filenames, Val2 is bufptr.
#~DOC~ & From Interlisp Brackets'C Add enough parens to balance.
Ignores %] but doesn't handle "...]..." unfortunately.
Will assume there is always matching [...], i.e. not handle top-level-].
*~DOC~ & Prefix Goto InterLisp FunctionS Find function prefixed by STRARG.
Looks for first match of CRLF (strarg whitespace (LAMBDA.
    [ versions also allowed.  NLAMBDA, DLAMBDA ok too.
Returns 0 if not found. Non-0 if found.
Returns with point after name if found, or else unchanged.
~DOC~ & Return To InterLispLC Tell EXEC to POP. When return, check communication.
Coroutine with InterLisp as its fork.
    Done via file EMACS-LISP-COROUTINE.CMD which POPs to LISP then
    CONTINUEs to EMACS.  (File in home directory.)
Upon return, see if InterLisp wrote us a LISP-TO-EMACS.XFER.1 file.
If so, act upon it.
The variable $Dont Return To InterLisp$ is set to inhibit this command,
    e.g. to inhibit recursive invocations, which are not yet well understood.
(~DOC~ & SetUp InterLisp-Mode Library#S Make some needed variables.
~DOC~ & Zap To InterLisp8S Send range of buffer to InterLisp.
NUMARG1,NUMARG2 is the range of buffer to send.  May be null.
Writes to EMACS-TO-LISP.XFER.1 in home directory.
Then returns to InterLisp.
5~DOC~ & SetUp Compressed INTERLISP-MODE LibrariesRS Call hidden & SetUps.
I.e. those from files whose ~FILENAME~s are not that of the object file.
The object file & SetUp (i.e. the main one) should call this.

This object file was compressed on 5:29am  Wednesday, 30 January 1980
by ECC on MC from the following source libraries:

    ECC; DSK: ILMODE 162,  01/30/80 05:29:25
~DIRECTORY~"InterLisp Mode
Find InterLisp Source File
Collect Function To Zap To InterLisp
Zap Collected SExps To InterLisp
Add Sexp To PROG List
Analyze For ?=
Collect Region To Zap To InterLisp
Function Occur
Goto InterLisp Function
Edit Interlisp Function
Reset To InterLisp Temporary
Zap Buffer To InterLisp
Zap Function To InterLisp
Zap Region To InterLisp
Zap String To InterLisp
^R Edited-By
^R End InterLisp Comment
^R Goto InterLisp Function
^R Indent for (* Comment
^R Indent for InterLisp
^R Insert InterLisp Parameter Name
^R Insert InterLisp PROG Variable Name
^R InterLisp ?=
^R InterLisp ]
^R List InterLisp Parameter Names
^R List InterLisp PROG Variables
& Act Upon InterLisp Return
& Find Collected SExp Buffer
& From Interlisp Brackets
& Prefix Goto InterLisp Function
& Return To InterLisp
& SetUp InterLisp-Mode Library
& Zap To InterLisp
& SetUp Compressed INTERLISP-MODE Libraries

~INVERT~[1 <Q1-1U1 Q1FP;> Q1